import request from '@/utils/request'

export function fetchList(page, size, searchName) {
  return request({
    url: `/api/company/companyList/${page}/${size}?name=${searchName}`,
    method: 'post'
  })
}
export function fetchMyList(searchName) {
  return request({
    url: `/api/company/list/my?name=${searchName}`,
    method: 'post'
  })
}

export function getOptionOfScale() {
  return request({
    url: `/api/dict/business/scaleInfo/options`,
    method: 'post'
  })
}

export function getOptionOfType() {
  return request({
    url: `/api/dict/business/scaleTypeInfo/options`,
    method: 'post'
  })
}

export function getOptionOfUser() {
  return request({
    url: `/api/auth/dic/userOptions`,
    method: 'post'
  })
}

export function insert(data) {
  return request({
    url: `/api/company/admin/add`,
    method: 'post',
    data: data
  })
}

export function update(data) {
  return request({
    url: `/api/company/admin/update`,
    method: 'post',
    data: data
  })
}

export function del(id) {
  return request({
    url: `/api/company/del/${id}`,
    method: 'post'
  })
}


